from sqlalchemy import Column, text, TEXT, JSON
from sqlalchemy.dialects.mysql import INTEGER, TINYINT
from field_types.base_types import String
from models.base_model import Base


class TaskCategory(Base):
    """
    项目类别表
    """
    __tablename__ = 'task_category'
    task_category_id = Column(INTEGER(11), primary_key=True)
    guid = Column(String(40, 'utf8mb4_unicode_ci'))
    name = Column(String(60, 'utf8mb4_unicode_ci'))
    handler = Column(String(256, 'utf8mb4_unicode_ci'))

    create_time = Column(INTEGER(11))
    create_user_id = Column(INTEGER(11))
    last_update_time = Column(INTEGER(11))
    last_update_user_id = Column(INTEGER(11))
    is_delete = Column(TINYINT(1), server_default=text("'0'"))
